package org.benben.shortlink.admin.common.enums;

import org.benben.shortlink.admin.common.convention.errorcode.IErrorCode;

/**
 * 用户异常码
 *
 * @author benben
 */
public enum UserErrorCodeEnum implements IErrorCode {

    USER_TOKEN_ERROR("A000200", "用户Token验证失败"),
    USER_NULL("B000200", "用户记录不存在"),
    USER_NAME_EXIST("B000201", "用户名已存在"),
    USER_EXIST("B000202", "用户记录已存在"),
    USER_SAVE_ERROR("B000203", "用户记录新增失败"),
    USER_NOT_EXIST("B000204", "用户记录不存在"),

    USER_LOGIN("B000205", "用户已登陆"),
    USER_LOGIN_ERROR("B000206", "用户Token不存在或用户未登录"),
    USER_NULL_GROUP_ERROR("B000207", "用户无分组信息")
    ;

    private final String code;

    private final String message;

    UserErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }

}
